searchBar.addTextChangedListener(new TextWatcher() {

	@Override
	public void afterTextChanged(Editable arg0) {
	Collections.sort(infos);
	if (!searchBar.getText().toString().equals("")) {
		int count = 0;
			for (int i = 0; i < infos.size(); i++) {
				if (infos.get(i).name.toLowerCase().contains(searchBar.getText().toString().toLowerCase())) {
					//move items matching the search-criteria to the first position
					Item item = infos.get(i);
					infos.remove(item);
					infos.add(count, item);
					count++;
				}
			}
		}
		myAdapter.notifyDataSetChanged();
	}

	@Override
	public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {
		//do nothing
	}

	@Override
	public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {
		//do nothing
	}

});